<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/6/27
 * Time: 3:47 PM
 */
namespace app\common\models;

class Page extends BaseModel
{
    public $table = 'yq_page';
    public $timestamps = true;
    protected $guarded = [''];

    public function category()
    {
        return $this->hasOne(Category::class, 'id', 'cid');
    }
    public  function atributeNames() {
        return [
            'title'  => '标题'
        ];
    }
    public  function rules()
    {
        return [
            'title' => 'required'
        ];
    }
}